import { createRouter, createWebHistory } from 'vue-router'
import RefDemo from '../views/RefDemo.vue'
import UserList from '../views/UserList.vue'
import Products from '../views/Products.vue'
import Cart from '../views/Cart.vue'

const routes = [
  {
    path: '/',
    redirect: '/ref-demo'
  },
  {
    path: '/ref-demo',
    name: 'RefDemo',
    component: RefDemo
  },
  {
    path: '/user-list',
    name: 'UserList',
    component: UserList
  },
  {
    path: '/products',
    name: 'Products',
    component: Products
  },
  {
    path: '/cart',
    name: 'Cart',
    component: Cart
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router



